/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ik.Reposteria.SMP.Encapsulados;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Malkavian
 */
@Embeddable
public class DireccionesagendaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "Agenda_id")
    private int agendaid;
    @Basic(optional = false)
    @Column(name = "id")
    private int id;

    public DireccionesagendaPK() {
    }

    public DireccionesagendaPK(int agendaid, int id) {
        this.agendaid = agendaid;
        this.id = id;
    }

    public int getAgendaid() {
        return agendaid;
    }

    public void setAgendaid(int agendaid) {
        this.agendaid = agendaid;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) agendaid;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DireccionesagendaPK)) {
            return false;
        }
        DireccionesagendaPK other = (DireccionesagendaPK) object;
        if (this.agendaid != other.agendaid) {
            return false;
        }
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.ik.Reposteria.SMP.Encapsulados.DireccionesagendaPK[ agendaid=" + agendaid + ", id=" + id + " ]";
    }
    
}
